import { request } from '@/utils/request'

// 获取文档内容
export function getDocContent(documentId:string) {
  return request({
    url: `/document/detail2/${documentId}`,
    method: 'POST',
  })
}

// 获取分享的文档内容 data: {sharePassword:""}
export function getSharedDocContent(documentId:string, data:any) {
  return request({
    url: `/share/document/${documentId}`,
    method: 'POST',
    data
  })
}

// 更新文档
export function updateDoc(data: any) {
  return request({
    url: '/document/update',
    method: 'POST',
    data
  })
}